home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / utility / 252 / dskpcsrc / keypad.def < prev    next >
Text File  |  1988-02-13  |  964b  |  34 lines

  1. DEFINITION MODULE Keypad;
  2.  
  3.    (* Contains procedures for controlling the calculator keypad. *)
  4.  
  5.  
  6.    IMPORT Screen;
  7.  
  8.  
  9.    PROCEDURE ConvertKeyToCh ( Key    : INTEGER;
  10.                               VAR Ch : CHAR ) : BOOLEAN;
  11.  
  12.       (* Convert the object index of Key into it's character value. *)
  13.  
  14.  
  15.    PROCEDURE Initialize ();
  16.  
  17.       (* Initialize the Keypad module. *)
  18.  
  19.  
  20.    PROCEDURE ProcessKey (
  21.       Key          : (* IN  *) INTEGER;
  22.       WindowRegion : (* IN  *) Screen.Box;
  23.       ShowKeys     : (* IN  *) BOOLEAN;
  24.       VAR Number   : (* OUT *) ARRAY OF CHAR ) : BOOLEAN;
  25.  
  26.       (* Process the key just pressed.  This routine returns     *)
  27.       (* true if the key is non-numeric.  If numeric keys have   *)
  28.       (* been pressed immediately prior to the non-numeric key,  *)
  29.       (* Number contains the series of numeric keys concatenated *)
  30.       (* into an ASCII representation of the number.             *)
  31.  
  32.  
  33. END Keypad.
  34.